/*! Copyright(c) 2008-2012
 *
 *\file		Uart_protocol.h
 *\brief		
 *\details	
 *
 *\author	Cai Peifeng
 *\version	
 *\date		28Jul12
 *
 *\warning	
 *
 *\history \arg	28Jul12, Cai Peifeng, Create the file
 */
#ifndef __UART_PROTOCOL_H__
#define __UART_PROTOCOL_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef struct sew_data_s
{
	uint8_t mode;				/*!< user mode (add by Cai Peifeng:2012-7-28 16:21:27)*/
	uint8_t param;				/*!< user param (add by Cai Peifeng:2012-7-28 16:21:45)*/
	uint8_t value;				/*!< the data of the param (add by Cai Peifeng:2012-7-28 16:21:53)*/
}sew_data_t;


/*!
 *\fn			int uart_receive(void *data,int length)
 *\brief   
 *
 *\param[in]   
 *\param[out]  
 *
 *\return  
 *\retval  
 *
 *\note		  
 */
int uart_receive(void *data,int length);

/*!
 *\fn			int uart_send(uint8_t type,sew_data_t *data)
 *\brief   
 *
 *\param[in]   
 *\param[out]  
 *
 *\return  
 *\retval  
 *
 *\note		  
 */
int uart_send(uint8_t type,sew_data_t* data);

void uart1_rx_interupt();

#ifdef __cplusplus
}
#endif

#endif	/* __UART_PROTOCOL_H__ */


